home *** CD-ROM | disk | FTP | other *** search
/ Top 200 Programs / Top 200 Programs.iso / Bob8 / THOMPSON / LIBERTY / PRODUCT / TUTORIAL.EXE / WK4PROG4.BAS < prev    next >
BASIC Source File  |  1996-02-28  |  913b  |  35 lines

  1.  
  2.     'WK4PROG4.BAS
  3.     'open a window with a button and a textbox
  4.     'the window is sized at 300 by 100 at position 200, 150
  5.     WindowWidth = 300
  6.     WindowHeight = 100
  7.     UpperLeftX = 200
  8.     UpperLeftY = 150
  9.     button #myFirst.ok, "OK!", [okClicked], UL, 15, 15
  10.     textbox #myFirst.field, 60, 15, 200, 25
  11.     open "myname's first window!" for window as #myFirst
  12.  
  13.     'now print some text into the textbox
  14.     print #myFirst.field, "Type some text here."
  15.  
  16.     'now stop and wait
  17.     input aVar$
  18.     goto [quit]
  19.  
  20. [okClicked]  'OK! was clicked.  Get the contents of the entry field
  21.  
  22.     'print a command to the textbox
  23.     print #myFirst.field, "!contents?"
  24.     'now get the contents from the textbox
  25.     input #myFirst.field, aString$
  26.  
  27.     'now pop up a notice saying what was in the textbox
  28.     notice aString$
  29.  
  30. [quit]
  31.     'now close the window
  32.     close #myFirst
  33.  
  34.     end
  35.